Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use-after-free bug in nmslib engine query path #1305

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

jmazanec15
Copy link
Member

Description

Ties data variable to lifetime of IndexWrapper by making it struct member as opposed to local constructor variable. This change reflects the structure of IndexWrapper before opendistro-for-elasticsearch/k-NN@7640186.

Add unit test. The unit test sometimes reproduces the issue. However, it is difficult to reproduce deterministically. I was able to reproduce on my mac fairly consistently, but not able to reproduce on linux.

Issues Resolved

#1304

Check List

  • Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@jmazanec15 jmazanec15 added Bug Fixes Changes to a system or product designed to handle a programming bug/glitch backport 2.x labels Nov 13, 2023
Signed-off-by: John Mazanec <jmazane@amazon.com>
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (87ddcb6) 85.13% compared to head (20b13fc) 85.13%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1305   +/-   ##
=========================================
  Coverage     85.13%   85.13%           
  Complexity     1210     1210           
=========================================
  Files           160      160           
  Lines          4931     4931           
  Branches        449      449           
=========================================
  Hits           4198     4198           
  Misses          537      537           
  Partials        196      196           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmazanec15 jmazanec15 merged commit 7c4d4e4 into opensearch-project:main Nov 14, 2023
42 of 48 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 14, 2023
Signed-off-by: John Mazanec <jmazane@amazon.com>
(cherry picked from commit 7c4d4e4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Bug Fixes Changes to a system or product designed to handle a programming bug/glitch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants